import request from '@/utils/http'

const baseUrl = process.env.VUE_APP_JAVA_URL

const api = {
  getResourceList: baseUrl + '/resource/getResourceList',
  saveResourceInfo: baseUrl + '/resource/saveResourceInfo',
  deleteResourceInfo: baseUrl + '/resource/deleteResourceInfo'
}

export default api

export function getTableData (parameter) {
  return request({
    url: api.getResourceList,
    method: 'post',
    data: parameter === undefined ? {} : parameter
  })
}

export function saveResourceInfo (parameter) {
  return request({
    url: api.saveResourceInfo,
    method: 'post',
    data: parameter
  })
}

export function deleteResourceInfo (parameter) {
  return request({
    url: api.deleteResourceInfo,
    method: 'post',
    data: parameter
  })
}
